﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;

namespace Model_Layer
{
    [DataContract]
    public class Airport
    {
        private int idAirport;
        private string name;
        private string acronym;
        private string location;
        private string phoneNo;

        #region for Dijkstra's

        private Flight adjFlight;
        private List<Flight> flightList;
        private int dist;
        private List<Airport> adjacentcyList;
        private List<int> adjacentcyIdList;
        private Airport previousVertex;
        private double price;



        [DataMember]
        public Flight AdjFlight
        {
            get { return adjFlight; }
            set { adjFlight = value; }
        }

        [DataMember]
        public List<Flight> FlightList
        {
            get;
            set;
        }

        [DataMember]
        public List<Airport> AdjacentcyList
        {
            get { return adjacentcyList; }
            set { adjacentcyList = value; }
        }

        [DataMember]
        public List<int> AdjacentcyIdList
        {
            get { return adjacentcyIdList; }
            set { adjacentcyIdList = value; }
        }

        [DataMember]
        public Airport PreviousVertex
        {
            get { return previousVertex; }
            set { previousVertex = value; }
        }

        [DataMember]
        public int Dist
        {
            get { return dist; }
            set { dist = value; }
        }
        #endregion


        public Airport()
        {
        }

        public Airport(string name)
        {
            this.name = name;
        }


        public Airport(int idairport)
        {
            this.idAirport = idairport;
        }

        public Airport(int idairport, string name, string acronym, string phoneno, string location)
        {
            this.idAirport = idairport;
            this.name = name;
            this.acronym = acronym;
            this.phoneNo = phoneno;
            this.location = location;

        }

        public Airport(string name, string acronym, string location, string phoneno, List<Flight> flightList)
        {
            this.name = name;
            this.acronym = acronym;
            this.location = location;
            this.phoneNo = phoneno;
            this.flightList = flightList;
        }

        [DataMember]
        public int IdAirport
        {
            get{ return idAirport; }
            set{ idAirport = value; }
        }

        [DataMember]
        public string Name
        {
            get;
            set;
        }

        [DataMember]
        public string Acronym
        {
            get;
            set;
        }

        [DataMember]
        public string Location
        {
            get;
            set;
        }

        [DataMember]
        public string PhoneNo
        {
            get;
            set;
        }

        [DataMember]        
        public double Price
        {
            get { return price; }
            set { price = value; }
        }

        
    }
}
